<?php
$hasError=false;
$username = $_POST["Username"];
if(!$username) {
    echo "用户名必须填写<br/>";
    $hasError=true;
}else{
    $len = strlen($username);
    if($len<5){
        echo "用户名至少要有五个字符<br/>";
        $hasError = true;
    }
}
$pswd = $_POST["Password"];
if(!$pswd){
echo "密码必须填写<br/>";
$hasError=true;
}
if($hasError) echo"检查成功";

echo "<a href='work2.3.html'>返回</a>";